﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Cms.Entity.LeaveWord
{
    public partial class LeaveWordInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "c_LeaveWord";
        }
        public override string GetInsertSql()
        {
            return "insert into c_LeaveWord ( [ID], [Name], [Content], [InputTime]) values ( @ID, @Name, @Content, @InputTime)";
        }
        public override string GetUpdateSql()
        {
            return "update c_LeaveWord set  [Name] = @Name, [Content] = @Content, [InputTime] = @InputTime where ID = @ID";
        }
        /// <summary>
        /// PK
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 留言人
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 留言内容
        /// </summary>
        public String Content
        {
            get;
            set;
        }
        /// <summary>
        /// 留言时间
        /// </summary>
        public DateTime? InputTime
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "content":
                    this.Content = (String)value;
                    break;
                case "inputtime":
                    this.InputTime = (DateTime?)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "name":
                    return this.Name;
                case "content":
                    return this.Content;
                case "inputtime":
                    return this.InputTime;
                default:
                    return null;
            }
        }
    }


}
